﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LunwenYun.Tool.Configration;
using LunwenYun.Tool.Framework;
using LunwenYun.Infrastructure.Entities.Entity;

namespace LunwenYun.Portal.Biz.Content
{
    public class EmailBuilder
    {
        /// <summary>
        /// 注册，发送邮箱验证邮件
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        public static string BuildRegisterActivtionEmail(string userName, string token)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬的用户：" + userName + "，<br/>您好！</p>");
            sb.AppendLine("<p>欢迎您注册" + SiteResource.SiteName + "，请点击以下链接激活您的账号</p>");
            sb.AppendLine("<p><a href=\"http://" + SiteResource.Domain + "/account/activation?token=" + token + "\">http://" +
                SiteResource.Domain + "/account/activation?token=" + token + "</a></p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        public static string BuildResetPasswordEmail(string userName, string token)
        {
            string url = "http://" + SiteResource.Domain + "/account/resetpassword?token=" + token + "&u=" + EncodeByBase64.Encode(userName);
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬会员：" + userName + "，<br/>您好！</p>");
            sb.AppendLine("<p>您在" + SiteResource.SiteName + "申请了重置密码。请点击以下链接以继续您的操作：</p>");
            sb.AppendLine("<p><a href=\"" + url + "\">" + url + "</a></p>");
            sb.AppendLine("<p>如果您未申请过重置密码，请尽快<a target=\"_blank\" href=\"http://" + SiteResource.Domain + "/account/login\">登录" + SiteResource.SiteName + "</a>，并修改您的密码</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        internal static string BuildEditorApply(string journalName, string agentUsername)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬会员，<br/>您好！</p>");
            sb.AppendLine("<p>您在" + SiteResource.SiteName + "申请期刊：\""+journalName+"\" 的约稿人申请已提交。请耐心等待管理员的审核。</p>");
            sb.AppendLine("<p>您可以登录<a target=\"_blank\" href=\"http://" + SiteResource.Domain + "/o/myorders\">" + SiteResource.SiteName + "</a>，并查看约稿信息。</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        public static string BuildNewTradingEmail(string agentName)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬会员，<br/>您好！</p>");
            sb.AppendLine("<p>您在" + SiteResource.SiteName + " 发布的投稿意向有了新动态：</p>");
            sb.AppendLine("<p>约稿人：" + agentName + " 发起了一条新的约稿信息，请您尽快处理。</p>");
            sb.AppendLine("<p>您可以登录<a target=\"_blank\" href=\"http://" + SiteResource.Domain + "/m/myorders\">" + SiteResource.SiteName + "</a>，并查看约稿信息。</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }
        /// <summary>
        /// 发给约稿人。投稿人向他发起约稿
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public static string BuildNewTradingToAgentEmail(string agentName)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬的 "+agentName+"，<br/>您好！</p>");
            sb.AppendLine("<p>您收到一份来至"+SiteResource.SiteName+"的约稿信息。投稿人希望通过您进行投稿。</p>");
            sb.AppendLine("<p>请您尽快登录<a target=\"_blank\" href=\"http://" + SiteResource.Domain + "/o/myorders\">" + SiteResource.SiteName + "</a>，并查看约稿信息。</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        internal static string BuildAcceptTradeForMember(string userName)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬的用户，<br/>您好！</p>");
            sb.AppendLine("<p>您的一份约稿信息已经被确认，为了推进稿件的刊登，请您及时支付所需费用。</p>");
            sb.AppendLine("<p>您的本次约稿费用将由" + SiteResource.SiteName + "进行担保。当稿件刊登时，您可以登录到用户中心/我的约稿中进行确认刊登。然后约稿费用会支付至约稿人账户。</p>");
            sb.AppendLine("<p>此外，如果在稿件刊登过程中您与约稿人方出现纠纷请及时联系我们，我们三方协商解决。</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        internal static string BuildAcceptTradeForAgent(string p)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬的用户，<br/>您好！</p>");
            sb.AppendLine("<p>您的一份约稿信息已经被确认，当投稿人支付后，此约稿将正式生效。</p>");
            sb.AppendLine("<p>您可以登录到<a target=\"_blank\" href=\"http://" + SiteResource.Domain + "/o/myorders\">" + SiteResource.SiteName + "</a>进行查看。</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        internal static string BuildNewPeriodicalNotify(string periodicalName, string agentUsername)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine("<p>有人新添加了期刊需要审核，请尽快登陆管理后台进行期刊审核！</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        internal static string BuildEditorApplyNotify(string periodicalName, string agentUsername)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine("<p>有人申请期刊\"" + periodicalName + "\"约稿人，请尽快登陆管理后台进行审核！</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 由约稿人发起的确认发表，需要提醒投稿人确认
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        internal static string BuildPublishConfirmNotice(Trade trade)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine(String.Format("<p>您的一份论文投稿约稿人已经确认发表成功。请您尽快登陆<a href=\"http://{0}\">{1}</a>按照约定内容进行确认。如果已经成功发表，请在用户中心中确认此次约稿完成。如果并未发表成功，请尽快联系约稿人了解情况，如果存在争议请联系管理员进行处理。！</p>",
                SiteResource.Domain, SiteResource.SiteName));
            sb.AppendLine("<p style=\"background-color:#f2dede; border:1px dashed #ccc;\">注：如果您不做任何处理，本次约稿将在<b>"+trade.ConfirmExpireDate.ToString("yyyy-MM-dd")+"日</b>被认为您已经确认论文已发表。另外，您也可以延长延长此时间。</p>");
            sb.AppendLine("<p>本次约稿合约为：" + trade.Description + " <br/> 约稿人为：" + new User().Find(trade.Supplier).NickName + "</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        internal static string BuildPublishIsdeferredNotice(Trade trade)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine(String.Format("<p>您有一份论文约稿已经确认发表成功，但由于某些原因被投稿人进行了延时处理。请您尽快登陆<a href=\"http://{0}\">{1}</a>并联系投稿人了解情况，如果存在争议请联系管理员进行处理！</p>",
                SiteResource.Domain, SiteResource.SiteName));
            sb.AppendLine("<p>本次约稿合约为：" + trade.Description + " <br/> 投稿人为：" + new User().Find(trade.Consumer).NickName + "</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        internal static string BuildPublishIsDisputeNotice(Trade trade)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine(String.Format("<p>您有一份论文约稿由于某些原因被投稿人进行了争议处理。请您尽快登陆<a href=\"http://{0}\">{1}</a>并联系投稿人了解情况，如果存在争议请联系管理员进行处理！</p>",
                SiteResource.Domain, SiteResource.SiteName));
            sb.AppendLine("<p>本次约稿合约为：" + trade.Description + " <br/> 投稿人为：" + new User().Find(trade.Consumer).NickName + "</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        internal static string BuildPayConfirmNotice(Trade trade)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine(String.Format("<p>您有一份论文约稿稿费已经支付完成并已经得到约稿人的确认，接下来会按照约稿安排论文发布。如您有任何问题请登陆<a href=\"http://{0}\">{1}</a>并联系约稿人咨询或向管理员询问！</p>",
                SiteResource.Domain, SiteResource.SiteName));
            sb.AppendLine("<p>本次约稿合约为：" + trade.Description + " <br/> 投稿人为：" + new User().Find(trade.Consumer).NickName + "</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }
    }
}
